<!--
 * @Description: 图片展示卡片
 * @Author: HuiSir<273250950@qq.com>
 * @Date: 2022-01-18 10:11:09
 * @LastEditTime: 2025-08-04 11:01:49
-->
<template>
  <el-card class="img-card" shadow="hover">
    <img v-if="img" :src="img" class="image" />
    <slot />
  </el-card>
</template>

<script lang="ts" setup>
// 组件名称（必要）
defineOptions({ name: "FyImgCard" });

defineProps({
  /**
   * 图片路径，全路径
   */
  img: {
    type: String,
    default: "",
  },
});
</script>

<style scoped lang="scss">
.img-card {
  border: 0;
  img.image {
    width: 100%;
    display: block;
  }
  :deep(.el-card__body) {
    padding: 0;
  }
}
</style>
